package br.com.naybee.framework.client.componente.gwt.root;

import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

public class Panel {

	public static void add(Widget widget, boolean clean) {
		RootPanel rootPanel = RootPanel.get();
		if (clean) {
			rootPanel.clear();
		}
		rootPanel.add(widget);
	}

	public static void add(Widget widget) {
		add(widget, true);
	}

	public static void clear() {
		RootPanel rootPanel = RootPanel.get();
		rootPanel.clear();
	}

}
